<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
	var page = "upload";
</script>
<?php
$page = "upload";

ob_start();
session_start();
require('structure.php');
get_header();
get_css();
get_js();
require('gest_login.php');
require('languages/it.php');
//require('functions.php');
require('database.php');

//recupero del cookie se c'�
if (isset($_COOKIE["ragusainfoto"]))
	get_session($_COOKIE["ragusainfoto"]);
	
//get_uploadify_css();
?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="./uploader/uploadify/swfobject.js"></script>
<script type="text/javascript" src="./uploader/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript" src="./languages/it.js"></script>
<script type="text/javascript" src="./js/upload.js"></script>
<script type="text/javascript">

photos=new Array();
<?php 
//write_js_cats_array();
?>

				$(function() {
				$('#custom_file_upload').uploadify({
  'uploader'       : './uploader/uploadify/uploadify.swf',
  'script'         : './uploader/uploadify/uploadify.php',
  'cancelImg'      : './uploader/uploadify/cancel.png',
  'multi'          : true,
  'auto'           : true,
  'fileExt'        : '*.jpg;*.png',
  'fileDesc'       : 'Image Files (.JPG, .GIF, .PNG)',
  'queueID'        : 'custom-queue',
  'removeCompleted': false,
  'onComplete'  : function(event, ID, fileObj, response, data) {

	elem=parse_photo_response(response);
	elem['IDdiv'] = ID;
	elem['modified'] = false;
	elem['rotation'] = 0;
	
	photos.push(elem);

	document.getElementById('custom_file_upload'+elem.IDdiv).innerHTML = create_photo_form(elem);
    document.getElementById('custom_file_upload'+elem.IDdiv).style.color='black';
	  
    },
  'onSelectOnce'   : function(event,data) {
      $('#status-message').text(data.filesSelected + lang.upload_file_selected);
    },
  'onAllComplete'  : function(event,data) {
      $('#status-message').text(data.filesUploaded + upload_loaded_files /*+ data.errors + ' errors.'*/);
      
	}
});				});






				
				</script>



</head>
<body class="grunge">
<div id="wrapper">
	<div id="header_container">
		<div id="header">
			<h1 id="logo"> <a href="index.html">Xero HTML &amp; CSS Template</a> </h1>
			<!-- end logo -->
			
			<?php require('structure/nav.php'); ?>
			
			<div class="clear"></div>
			<!-- clears floted logo & nav -->
			
			<div id="page_title">
				<ul class="breadcrumb_nav">
					<li><a href="../">Home</a></li>
					<li><a href="#">Upload</a></li>
				</ul>
				<h1>Carica nuove foto</h1>
			</div>
			<!-- end page title -->
			
		</div>
		<!-- end header (940px width) --> 
	</div>
	<!-- end header container (100% width) -->
	<div id="body_content">
		<div id="content" class="">
			<div class="has_sidebar left">
				<h2>Seleziona le foto che vuoi caricare<em class="heading_description"></em></h2>
				<div id="custom-demo" class="demo">
      
        
        			<div class="demo-box">
        				<div id="status-message"></div>
						<input id="custom_file_upload" type="file" name="Filedata" style="display: none; " width="120" height="30"><object type="application/x-shockwave-flash" data="/uploadify/uploadify.swf" width="120" height="30" id="custom_file_uploadUploader" style="visibility: visible; " wmode="opaque"><param name="quality" value="high"><param name="wmode" value="opaque"><param name="allowScriptAccess" value="sameDomain"><param name="flashvars" value="uploadifyID=custom_file_upload&amp;pagepath=/demos/&amp;script=/uploadify/uploadify.php&amp;folder=/uploads&amp;width=120&amp;height=30&amp;wmode=opaque&amp;method=POST&amp;queueSizeLimit=3&amp;simUploadLimit=3&amp;fileDesc=Image Files (.JPG, .GIF, .PNG)&amp;fileExt=*.jpg;*.gif;*.png&amp;multi=true&amp;auto=true&amp;fileDataName=Filedata&amp;queueID=custom-queue"></object>        </div>
						<div id="custom-queue" class="uploadifyQueue"></div>
      			</div>
				<div id="save-buttons"></div>
				
			</div>
			
			
		</div>
		
		
		
		
	</div>
	<!-- end body content -->
	
	<?php require('structure/footer.php'); ?>
	
</div>
<!-- end wrapper -->
</body>
</html>
